import service from "./index.js";

// 获取页数
export function pageCount(data) {
    return service({
        url: '/admin/course/page/count',
        method: 'get',
        params: data
    })
}
// 获取列表数据
export function page(data, page) {
    return service({
        url: '/admin/course/page/' + page,
        method: 'get',
        params: data
    })
}
// 获取教师
export function teacherAll() {
    return service({
        url: '/admin/teacher/names',
        method: 'get',
    })
}
// 添加
export function courseAdd(data) {
    return service({
        url: '/admin/course',
        method: 'post',
        data: data,
    })
}
// 删除
export function mixinDelete(id) {
    return service({
        url: '/admin/course/' + id,
        method: 'delete',
    })
}
// 获取详情
export function getCourse(id) {
    return service({
        url: '/admin/course/' + id,
        method: 'get'
    })
}
// 修改
export function courseEdit(data) {
    return service({
        url: '/admin/course',
        method: 'put',
        data: data
    })
}